/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.List;
import com.jeesite.common.collect.ListUtils;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 采购入库Entity
 * @author HOHD
 * @version 2020-12-11
 */
@Table(name="st_buy_stock_in", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="bill_no", attrName="billNo", label="入库单号"),
		@Column(name="bill_date", attrName="billDate", label="单据日期"),
		@Column(name="supplier_id", attrName="supplierId", label="供应商"),
		@Column(name="in_or_out", attrName="inOrOut", label="单据类型"),
		@Column(name="record_date", attrName="recordDate", label="入账日期"),
		@Column(name="remark", attrName="remark", label="备注"),
	}, orderBy="a.id DESC"
)
public class StBuyStockIn extends DataEntity<StBuyStockIn> {
	
	private static final long serialVersionUID = 1L;
	private String billNo;		// 入库单号
	private Date billDate;		// 单据日期
	private String supplierId;		// 供应商
	private Integer inOrOut;		// 单据类型
	private Date recordDate;		// 入账日期
	private String remark;		// 备注
	private List<StBuyStockInDetail> stBuyStockInDetailList = ListUtils.newArrayList();		// 子表列表
	
	public StBuyStockIn() {
		this(null);
	}

	public StBuyStockIn(String id){
		super(id);
	}
	
	@Length(min=0, max=20, message="入库单号长度不能超过 20 个字符")
	public String getBillNo() {
		return billNo;
	}

	public void setBillNo(String billNo) {
		this.billNo = billNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBillDate() {
		return billDate;
	}

	public void setBillDate(Date billDate) {
		this.billDate = billDate;
	}
	
	@Length(min=0, max=36, message="供应商长度不能超过 36 个字符")
	public String getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId;
	}
	
	public Integer getInOrOut() {
		return inOrOut;
	}

	public void setInOrOut(Integer inOrOut) {
		this.inOrOut = inOrOut;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getRecordDate() {
		return recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}
	
	@Length(min=0, max=255, message="备注长度不能超过 255 个字符")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public List<StBuyStockInDetail> getStBuyStockInDetailList() {
		return stBuyStockInDetailList;
	}

	public void setStBuyStockInDetailList(List<StBuyStockInDetail> stBuyStockInDetailList) {
		this.stBuyStockInDetailList = stBuyStockInDetailList;
	}
	
}